// import request from 'umi-request';
import request from '@/utils/request';
export async function queryRule(params) {
    const obj = {
        parent: true
    };
    Object.assign(params, obj);
    return request('resource/list', {
        params,
    });
}
export async function removeRule(params) {
    return request(`resource/${params}`, {
        method: 'DELETE',
    });
}
export async function addRule(params) {
    return request('resource', {
        method: 'POST',
        data: {
            ...params
        },
    });
}
export async function updateRule(params) {
    return request('resource', {
        method: 'PUT',
        data: {
            ...params
        },
    });
}

export async function queryAuth(params) {
    return request('/factory/system/sysRole/page', {
        params,
    });
}